package com.roadjava.rbac.service;

import com.roadjava.rbac.bean.entity.AuthorityDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.roadjava.rbac.bean.req.authority.AuthorityAddReq;
import com.roadjava.rbac.bean.req.authority.AuthorityUpdateReq;
import com.roadjava.rbac.bean.vo.AuthorityTreeVO;
import com.roadjava.rbac.bean.vo.AuthorityVO;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
* @author 27249
* @description 针对表【authority(权限表)】的数据库操作Service
*/
public interface AuthorityService extends IService<AuthorityDO> {
    //返回权限树
    List<AuthorityTreeVO> queryTree();
    /**
     * 动态获取后端所有请求映射
     */
    List<String> listBackUri();
    /**
     * 添加权限
     */
    void add(AuthorityAddReq addReq);
    /**
     * 查询表格树
     */
    List<AuthorityVO> queryTableTree();
    /**
     * 通过id查询
     * @param id 主键
     */
    AuthorityVO queryById(Long id);
    /**
     * 按id修改
     */
    void modifyById(AuthorityUpdateReq updateReq);
    /**
     * 按id删除
     */
    void deleteById(Long id);
}
